package com.controller;


import com.service.SeckillService;
import com.vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class ProductController extends BaseController{

    @Autowired
    private SeckillService service;

    @PostMapping("/seckill")
    public ResultVO seckill(int pid) {
        service.decrProduct(pid);
        return success();
    }
}
